|
|
|
|
|
|
|
Dim nPos
Dim sUserType
Dim f
Set f = Document.frmMain
'Make sure name is not blank
If Trim(f.txtName.Value) = "" Then
Msgbox "Please enter your name and try again!"
Exit Sub
End if
'Validate E-Mail Address Format
nPos = Instr(f.txtEmail.Value,"@")
If nPos = 0 Then
Msgbox "Please use the format user@server.domain"
Exit Sub
End If
'Classify user as business or other
nPos = Instr(LCase(f.txtEmail.Value),".com")
If nPos <> 0 Then '.com = commercial domain
sUserType = "BUSINESS"
Else
sUserType = "OTHER"
End If
'Put user type in hidden form field
f.txtUserType.Value = sUserType
'Submit the form
f.Method = "POST"
f.Action = "formproc.asp"
f.submit
End Sub
-->
</SCRIPT>
<BODY>
Please fill out all fields below:<BR><BR>
<FORM NAME=frmMain>
Name: <INPUT Type=Text maxlength=20 size=20 name=txtName> <BR>
Email: <INPUT Type=Text maxlength=30 size=30 name=txtEmail> <BR>
<INPUT Type=Hidden name=txtUserType>
<INPUT Type=Button OnClick=submitform Value="Continue">
</FORM>
</BODY>
</HTML> |
|
|
|
|
|